UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7V8MYZVGPWomnnPwMC3/McVTdBMVJ9rnbXAP1YdN4xM='
WHERE
key_id = 'aea7d0ea07a29158638335927e291c3cd79c3b1621ccedf7147b9ca91fbb5b58'
AND (
token = '7V8MYZVGPWomnnPwMC3/McVTdBMVJ9rnbXAP1YdN4xM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)