UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'M6ogx2CXNf1iELoqxffoWZgyfyBKs/2pQDw8QdG6TBE='
WHERE
key_id = 'bf5eed20e14e6dc359acdcdd9a2e46159b31cbb13e5f8de3a0644174eb9e2263'
AND (
token = 'M6ogx2CXNf1iELoqxffoWZgyfyBKs/2pQDw8QdG6TBE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)