UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'z/CpFMcXIKRQt+ZPDpuc968KJXa9SB8pONaHF1zjxpo='
WHERE
key_id = '2808ea430edf6fd3394bf4a3c2c30b3b1e9b45f180c2ce3349dc41bf6d1b8b13'
AND (
token = 'z/CpFMcXIKRQt+ZPDpuc968KJXa9SB8pONaHF1zjxpo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)