UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'UH5SeAPqo3k+peRNuo9t/r0/V8lG+74xn5Xxm3LYQbc='
WHERE
key_id = '4803b62279f396dad249ef5e99ded9f7908a548edee638e2475778f79c74520a'
AND (
token = 'UH5SeAPqo3k+peRNuo9t/r0/V8lG+74xn5Xxm3LYQbc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)