UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'zjQT0r57saHhbO+75dRDEV/HRkejlAtWqGdRoC/p1nw=' 
WHERE 
  key_id = 'acff747e995c8a304793a628cd7e204187677b6ea3e4de30ea1c49bc84c12b9a' 
  AND (
    token = 'zjQT0r57saHhbO+75dRDEV/HRkejlAtWqGdRoC/p1nw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00043