UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Hx1IrCfo0nBjPL75mKV0/Q08hobb5lJefkin80zoTrQ='
WHERE
key_id = '9404d8d8c01ebeb54c395076921b6f2d1f142da1da2212e41f774e47cb5c0d67'
AND (
token = 'Hx1IrCfo0nBjPL75mKV0/Q08hobb5lJefkin80zoTrQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)