UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3sBiliBlZTnrEUnerUByWejPrB8swk49lwI00KD/+9Q='
WHERE
key_id = 'd03d176d714dcf2929abec0c1fb8d78ed0d4cf500474deb7fe7f29f99af5cadc'
AND (
token = '3sBiliBlZTnrEUnerUByWejPrB8swk49lwI00KD/+9Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)