UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'JTkAAxSmmsLf/2OuWAVVPwHpn98qoiKk7VEYnFVcOoc='
WHERE
key_id = 'da9356a600781ca72d175257b817fe7d9bf04da223e53a1dec2ffd70a564b0d5'
AND (
token = 'JTkAAxSmmsLf/2OuWAVVPwHpn98qoiKk7VEYnFVcOoc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)