UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '0jccGVKfXwdIJSiDXRv95dU9PHHIqmQotqtdBE9rovY='
WHERE
key_id = '61104be88757be089c5d314d63b1041f5288a5f6b45409a8a0703facc47bff91'
AND (
token = '0jccGVKfXwdIJSiDXRv95dU9PHHIqmQotqtdBE9rovY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)