UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'qFBMCs/HfK+bT31rJfTJGpJQMydbjpeAyfKEUJtRm2c='
WHERE
key_id = '11d1c52196fa64c46817072a58af63ecdc98826914860b503c6b56c2edbbe91c'
AND (
token = 'qFBMCs/HfK+bT31rJfTJGpJQMydbjpeAyfKEUJtRm2c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)