UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+LASpACZcyThlOHRZIMfp+Du2Olzh92kBLkniX+H09s=' 
WHERE 
  key_id = '86c6fb4ac6e3100d66962a0df48887644cd8f0f5e15e6540f7db372ff23b3bbe' 
  AND (
    token = '+LASpACZcyThlOHRZIMfp+Du2Olzh92kBLkniX+H09s=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00041