UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'j/gmKCCzEFULe/efyMZH0DsHtNZC5v1j1+KLiNLcOug=' 
WHERE 
  key_id = 'cc8c24d16db558accf02eeb84e91e7e5dd9d7f1ad4dd4b05ad9ad9ddb4996c12' 
  AND (
    token = 'j/gmKCCzEFULe/efyMZH0DsHtNZC5v1j1+KLiNLcOug=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00040