UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'u3pAfBGOUE/44PE9eSHAoTd10nyWtL1WjSikRVSmm10=' 
WHERE 
  key_id = '65d01bcc61f994cf3f7d78cc1450bfcb7d0805dcbb84640026dd5779605a6850' 
  AND (
    token = 'u3pAfBGOUE/44PE9eSHAoTd10nyWtL1WjSikRVSmm10=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020