UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'EJxKQwl4vOeQUwvaYvxnLrdRjGPLpql4HtMlq4JK1CM='
WHERE
key_id = '85ed3d8b442216254f2631ab504db72c5111ea60dfb14c6f396c4177ac50cf2b'
AND (
token = 'EJxKQwl4vOeQUwvaYvxnLrdRjGPLpql4HtMlq4JK1CM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)