UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'slUzk8dxepYCNWWtQmO0bzjnLpE8tfajAjUGe/KE9xU='
WHERE
key_id = '4f8a1fb4ceb8c67511af52f3a0ad74c054277a9fb8225c1840b773611ccc4cf9'
AND (
token = 'slUzk8dxepYCNWWtQmO0bzjnLpE8tfajAjUGe/KE9xU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)