UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '03Hyz3RzfNy8RkJ6Eq6FgbEFUabPulv4x6aPYbPgMu4='
WHERE
key_id = '1779069273b4aa20eeefe36cfe4447da3dad7fa68fab4c08b15686d02d214f67'
AND (
token = '03Hyz3RzfNy8RkJ6Eq6FgbEFUabPulv4x6aPYbPgMu4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)