UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 't8ZIs6aXaBT25VUjyTR91wFp3A8QhlS/da4L2RRSD5o='
WHERE
key_id = '8cf60923c25f00233fd1ad4df407bdf610dfb5429417ffa2c482306e96ea2402'
AND (
token = 't8ZIs6aXaBT25VUjyTR91wFp3A8QhlS/da4L2RRSD5o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)