UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LtBwElKqqzBBr8pBHWTFQ2ZOd3Qg/S+/vqgUFRkHlKQ='
WHERE
key_id = '0500276ac9f4b395531461e82fa88b0cfa49293bac87d78186b5ad53018d78c7'
AND (
token = 'LtBwElKqqzBBr8pBHWTFQ2ZOd3Qg/S+/vqgUFRkHlKQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)