UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4BfeeB9LzSSG8wHttkUkZ8RFKT/FekFVdFmzxf+wcjo='
WHERE
key_id = '431aa2f0e649fc6a3da24d205bd6065ef427c100d9b5f7a92deb6a88f7e9f2e6'
AND (
token = '4BfeeB9LzSSG8wHttkUkZ8RFKT/FekFVdFmzxf+wcjo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)