UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'eR5zYI2UjZueDwr5KmHdPsE/ErUeTrgbS9pBFW+cMYE=' 
WHERE 
  key_id = '984c3376ca6d54dff11974fa5e1158f97864f5456bd76aa067105a1806770749' 
  AND (
    token = 'eR5zYI2UjZueDwr5KmHdPsE/ErUeTrgbS9pBFW+cMYE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00052