UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Eq/FUEb56Er605pCljYsy1D95d+7l/bKG8fDXgXWVVw='
WHERE
key_id = '330ea1593cc2002a74d4087d79f94c97e38f741373569d0f61a19c934f508340'
AND (
token = 'Eq/FUEb56Er605pCljYsy1D95d+7l/bKG8fDXgXWVVw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)