UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'iRDurEQpV/J/oPJFynTpE+wLv4dqSkaHfKSqwi5KL5U=' 
WHERE 
  key_id = '44888a39b4410a73c33358fb87fa3dde87b3b5693a2d069a969b02cd905b7ffc' 
  AND (
    token = 'iRDurEQpV/J/oPJFynTpE+wLv4dqSkaHfKSqwi5KL5U=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030