UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'RIkbr1XPuVQ6hjqVroK57iQX/pHtPGW2sw+CEB+oOjI=' 
WHERE 
  key_id = 'c4a3c79d82abf1bc68d960b32c0e062e43e0c7dfad94d09c08a8bdaafc9a8636' 
  AND (
    token = 'RIkbr1XPuVQ6hjqVroK57iQX/pHtPGW2sw+CEB+oOjI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00045