UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LxEk73ZWJ4rzBNCVousajDbvxBf6iSMnvBI9ZTf2JpQ='
WHERE
key_id = '5967cedd6a238218d9de10c2c1bacc14024b31f5f8a7aac5eeae46cdf3eb952a'
AND (
token = 'LxEk73ZWJ4rzBNCVousajDbvxBf6iSMnvBI9ZTf2JpQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)