UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'EL0W/neEzLa7OS8FC/bEqKK5vvqwyGMZPr9MSglU4og=' 
WHERE 
  key_id = '5ef3c672151b51e2783e3eb2f6ff7774a900ef9b2a348f93f0018a61cfd45b72' 
  AND (
    token = 'EL0W/neEzLa7OS8FC/bEqKK5vvqwyGMZPr9MSglU4og=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033