UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LNgSP4ZXCa1zzm4Pwn/lkKZRd6rO5rIE/YSiABX89i4='
WHERE
key_id = '2cf0009d782674e71621770e8eba58efb8a9e484ebd295baf885d22d1594cee6'
AND (
token = 'LNgSP4ZXCa1zzm4Pwn/lkKZRd6rO5rIE/YSiABX89i4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)