UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+UFBePxpq3Ib2Kn2aRpSNqp2BbkyoM/YVNgPMhD5gsY='
WHERE
key_id = '73723a24c570db656a766f8de946c290cd06212fd071ea4f9c226ff6f3f71ad3'
AND (
token = '+UFBePxpq3Ib2Kn2aRpSNqp2BbkyoM/YVNgPMhD5gsY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)