UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WK1aDWJ/pzEi5x9lCDIL5rI8gRF3xw2yHrLBmZNxQLg='
WHERE
key_id = '19aa83124d0de26b50ee22f4bbc7fd361961c630a5f10a82605ea73f4f0c25f0'
AND (
token = 'WK1aDWJ/pzEi5x9lCDIL5rI8gRF3xw2yHrLBmZNxQLg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)