UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1oA5uwjirbyFqH+uXYbC/rFcTXxd7lzZlz5YbUXN8qE='
WHERE
key_id = '0c8b4ec70f47e4b9758157568ce76ad2726e6c056d86b4e1c91616d6d94c55f1'
AND (
token = '1oA5uwjirbyFqH+uXYbC/rFcTXxd7lzZlz5YbUXN8qE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)