UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'cAT3PZshK4qxJNzHgcflP6tHJBzaSvZ4wNgyuBEo/ac='
WHERE
key_id = '554cd79d676cd0d6755894581535315cd042e98f53da824bae782ab994d8b195'
AND (
token = 'cAT3PZshK4qxJNzHgcflP6tHJBzaSvZ4wNgyuBEo/ac='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)