UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'RzhMJa/ge9VwKsak0QNlJNBKXM6EGi3ZsZIImuCNaSs='
WHERE
key_id = 'd39fd3b8da4b56e6f38ef4a47198a922310c65ec08b0e200f000869c6088ebbd'
AND (
token = 'RzhMJa/ge9VwKsak0QNlJNBKXM6EGi3ZsZIImuCNaSs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)