UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vsA93ULnb64ZTgYkQsVrOZeimnXzECpMtsNmWxzDH/A='
WHERE
key_id = '2bb29757340c0edb6faba1696626fc485a7453e654ee4e9c55ed25492e40d5da'
AND (
token = 'vsA93ULnb64ZTgYkQsVrOZeimnXzECpMtsNmWxzDH/A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)